<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Document</title>
    <style>
        #box{width:100px;height:100px;border:1px solid #000;}
    </style>
</head>
<body>
    
    <button onclick="mb()">变大</button>
    <br>
    <img src="./1.jpg" width="100" title="图片" id="myimg">

    <script>
        function mb()
        {
            var img=document.getElementById("myimg");
            console.log(img);
            //console.log(img);
            //console.dir(img);
            //属性
            //console.log(img.title);
            img.width += 50;
            img.title="这是一张图片";
        }
    </script>
</body>
</html>